import Main from '@/components/main'
const home = () => import('@/view/Home/Moudle/FullScreen');


import homeBack from '@/view/Home/Home-back'
/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  title: { String|Number|Function }
 *         显示在侧边栏、面包屑和标签栏的文字
 *         使用'{{ 多语言字段 }}'形式结合多语言使用，例子看多语言的路由配置;
 *         可以传入一个回调函数，参数是当前路由对象，例子看动态路由和带参路由
 *  hideInBread: (false) 设为true后此级路由将不会出现在面包屑中，示例看QQ群路由配置
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面在切换标签后不会缓存，如果需要缓存，无需设置这个字段，而且需要设置页面组件name属性和路由配置的name一致
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 *  beforeCloseName: (-) 设置该字段，则在关闭当前tab页时会去'@/router/before-close.js'里寻找该字段名对应的方法，作为关闭前的钩子函数
 * }
 */
export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true,
      always: true,
      //access:["*"],
    },
    component: () => import('@/view/Login/Login')
  },
  //首页
  {
    path: '/',
    name: '_home',
    redirect: '/home',
    component: home,
    meta: {
      hideInMenu: true,
      notCache: true,
      icon: 'md-home',
      always: true,
    },
    children: [
      {
        path: '/home',
        name: 'home',  //此项不要改
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true,
          icon: 'md-home',
          always: true,
        },
        //component: () => import('@/view/Home/Home')
        component: () => import('@/view/Home/Moudle/FullScreen')

      }
    ]
  },
  {
    path: '/commandDispatch',
    name: 'commandDispatch',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '指挥调度',
      //access:["*"],
    },
    component: () => import('@/view/Home/CommandDispatch'),
  },

  //多屏监控
  {
    path: '/multiScreenPlay',
    name: 'multiScreenPlay',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '多屏监控',
      //access:["*"],
    },
    component: () => import('@/view/Home/Moudle/MultiScreenPlay'),
  },
  //大屏
  {
    path: '/fullScreen',
    name: 'fullScreen',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '大屏',
      always: true,
    },
    //component: () => import('@/view/Home/Moudle/FullScreen'),
    component: () => import('@/view/Home/Moudle/FullScreen'),
  },
  //轨迹回放
  {
    path: '/moveTrackPlay',
    name: 'moveTrackPlay',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '轨迹回放'
    },
    component: () => import('@/view/Home/Moudle/MoveTrackPlay'),
  },
  //数据统计报表
  {
    path: '/statistics',
    name: 'statistics',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '数据统计'
    },
    component: () => import('@/view/Home/Moudle/Statistics'),
  },
  //报警管理
  {
    path: '/alarmManage',
    name: 'alarmManage',
    meta: {
      hideInMenu: true,
      icon: 'ios-keypad',
      title: '报警管理'
    },
    component: () => import('@/view/Home/Moudle/AlarmManage'),
  },

  /** 信息管理菜单 */
  {
    /** 信息管理 面面框架 */
    path: '/data_main',
    name: 'data_main',
    redirect: '/data_main_home',
    //component: Main,
    component: () => import('@/components/main'),
    meta: {
      hideInMenu: true,
      notCache: true,
      icon: 'md-home',
      always: true,
    },
    children: [
      {
        /** 的首页 */
        path: '/data_main_home',
        name: 'data_main_home',  //此项不要改 在libs/util.js 的 getHomeRoute
        meta: {
          hideInMenu: true,
          title: '信息管理',
          notCache: true,
          icon: 'md-home',
          always: true,
        },
        //component: () => import('@/view/DataHome/Home')
        component: () => import('@/view/Device/Device4g')
        //component: () => import('@/view/Schedule/ScheduleQuatrz')
      }
    ]
  },

  /** 调度任务 菜单 */
/*

  {
    path: '/system/schedule',
    name: 'system_schedule',
    meta: {
      hideInBread: true
    },
    component: Main,
    children: [{
      path: '/system/schedule/page',
      name: 'system_schedule_page',
      meta: {
        title: '任务调度'
      },
      component: () => import('@/view/Schedule/ScheduleQuatrz')
    }],
  },
*/

  /** 设备管理 */
  {
    path: '/device_manage',
    name: 'device_manage',
    meta: {
      icon: 'md-tablet-portrait',
      title: '设备管理'
    },
    component: () => import('@/components/main'),
    children: [
      {
        path: '/gb_server_reg',
        name: 'gb_server_reg',
        meta: {
          /*icon: 'ios-paper-outline',*/
          title: '国标服务器注册',
          access:['admin','Admin','super']
        },
        component: () => import('@/view/GbServer/GbServer')
      },
      {
        path: '/net_dev_reg',
        name: 'net_dev_reg',
        meta: {
          /*icon: 'ios-cloud-outline',*/
          title: '联网音视频设备注册'
        },
        component: () => import('@/view/Device/Device4g')
      },
      {
        path: '/stand_alone_dev_reg',
        name: 'stand_alone_dev_reg',
        meta: {
          title: '单机音视频设备注册'
        },
        component: () => import('@/view/Device/DeviceCommon')
      },
      {
        path: '/gps/dev/reg',
        name: 'gps_dev_reg',
        meta: {
          title: 'GPS及北斗定位设备注册'
        },
        component: () => import('@/view/Device/DeviceXeomas')
      },
      {
        path: 'collect/site/reg',
        name: 'collect_site_reg',
        meta: {
          title: '采集站点注册'
        },
        component: () => import('@/view/Device/Site')
      },
      {
        path: '/storage/svr/reg',
        name: 'storage_svr_reg',
        meta: {
          title: '集中存储服务器注册'
        },
        component: () => import('@/view/Device/StorageSite')
      },
    ]
  },

  /** 围栏管理 */
  {
    path: '/fence/manage',
    name: 'fence_manage',
    redirect: '/fence_manage',
    meta: {
      /*icon: 'ios-podium-outline',*/
      icon: 'md-ionic',
      title: '围栏管理'
    },
    component: () => import('@/components/main'),
    children: [
      {
        path: '/fence/maintain',
        name: 'fence_maintain',
        meta: {
          title: '围栏设置'
        },
        component: () => import('@/view/Fence/FenceManage')
        //component: () => import('@/view/FutureBuild')
      },
      {
        path: '/fence/alarm',
        name: 'fence_alarm',
        meta: {
          title: '围栏报警'
        },
        component: () => import('@/view/Fence/FenceAlarmQuery')
      },
    ]
  },
  /** 档案管理 */
  {
    path: '/archives/manage',
    name: 'archives_manage',
    meta: {
      /*icon: 'ios-podium-outline',*/
      icon: 'ios-list-box',
      title: '档案管理'
    },
    component: () => import('@/components/main'),
    children: [
      {
        path: '/media/file/manage',
        name: 'media_file_manage',
        meta: {
          title: '音视频文件管理'
        },
        component: () => import('@/view/Document/Document')
      },
      {
        path: '/media/file/upload',
        name: 'media_file_upload',
        meta: {
          title: '文件上传'
        },
        component: () => import('@/view/Document/UploadFile')
      },
    ]
  },

  /** 系统管理 */
  {
    path: '/system/maintain',
    name: 'system_maintain',
    meta: {
      icon: 'md-settings',
      title: '系统管理'
    },
    component: () => import('@/components/main'),
    children: [
      {
        path: '/organization_reg',
        name: 'organization_reg',
        meta: {
          title: '组织机构注册'
        },
        component: () => import('@/view/Organization/Organization')
      },
      {
        path: '/user_reg',
        name: 'user_reg',
        meta: {
          title: '人员注册'
        },
        component: () => import('@/view/User/User')
      },

      {
        path: '/user/role/reg',
        name: 'user_role_reg',
        meta: {
          title: '权限角色'
        },
        component: () => import('@/view/User/Role')
      },
      {
        path: '/user/dict/reg',
        name: 'user_dict_reg',
        meta: {
          title: '字典管理'
        },
        component: () => import('@/view/System/Dictionaries')
      },

      {
        path: '/sys/config/setting',
        name: 'sys_config_setting',
        meta: {
          title: '系统参数设置',
          access:['admin','Admin','super']
        },
        component: () => import('@/view/System/SysConfig')
      },
      {
        path: '/system/task/schedule',
        name: 'system_task_schedule',
        meta: {
          title: '任务调度',
          access:['admin','Admin','super']
        },
        component: () => import('@/view/Schedule/ScheduleQuatrz')
      },
      {
        path: '/password/change',
        name: 'password_change',
        meta: {
          /*icon: 'md-contact',*/
          title: '修改账号密码'
        },
        component: () => import('@/view/User/ChangePassword')
      },
      {
        path: '/log/_maintain',
        name: 'log_maintain',
        meta: {
          /*icon: 'ios-book',*/
          title: '日志查询'
        },
        component: () => import('@/view/SystemLog/SystemLog')
      },
      {
        path: '/menu/auth/maintain',
        name: 'menu_auth_maintain',
        meta: {
          icon: 'ios-book',
          title: '菜单权限设置',
          access: ['super','Super']
        },
        component: () => import('@/view/Authorization/Authorizatin')
      },
      {
        path: '/comm/test',
        name: 'comm_test',
        meta: {
          icon: "md-bulb",
          title: '测试的页面放这里',
          access: ['super','Super']
        },
        component: () => import('@/view/Test/RecordTest')
      }

    ]
  },
]
